//
//  MCImageScrollView.h
//  QuKeClient
//
//  Created by delicious on 2017/12/6.
//  Copyright © 2017年 delicious. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface imageViewCell:UICollectionViewCell
@property (nonatomic, strong) UIImageView * imageView;
-(void)update:(id)model collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath;
@end


@protocol MCImageScrollViewDataSource <NSObject>
@required
-(UIEdgeInsets)imageScrollView:(UICollectionView *)collectionView imageCellForSectionAtIndex:(NSInteger)section;
//iten 之间的间距
- (CGFloat)imageScrollView:(UICollectionView *)collectionView lineSpacingForSectionAtIndex:(NSInteger)section;
//行之间的间距
- (CGFloat)imageScrollView:(UICollectionView *)collectionView interitemSpacingForSectionAtIndex:(NSInteger)section;
- (CGSize)imageScrollView:(UICollectionView *)collectionView sizeForItemAtIndexPath:(NSIndexPath *)indexPath;

//@optional
@end

@protocol MCImageScrollViewDelegate <NSObject>
-(void)imageScrollView:(UICollectionView *)collectionView imageCellAtIndexPath:(NSIndexPath *)indexPath;
@end


@interface MCImageScrollView : UIView
- (instancetype)initWithClass:(Class)aClass scrollDirection:(UICollectionViewScrollDirection)scrollDirection;
- (instancetype)initWithClass:(Class)aClass;
- (void)updateViewForImages:(NSArray *)images;
-(void)deselectItem;
/*  aClass 这个必须要有这个方法
 -(void)update:(id)model collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
 */
@property (nonatomic) Class aClass;
@property (nonatomic, weak) id<MCImageScrollViewDataSource>dataSource;
@property (nonatomic, weak) id<MCImageScrollViewDelegate>delegate;
@property (nonatomic, strong) UICollectionView * collectionView;
@property (nonatomic, strong) NSMutableArray * images;


@end
